package top.lfyao.designpattern.details.command.example;

/**
 * 客户端
 */
public class exampleClient {
    public static void main(String[] args){
        // 准备厨师
        Barbecuer barbecuer = new Barbecuer();
        // 准备菜单
        MenuCommand bakeChickenWingCommand = new BakeChickenWingCommand(barbecuer);
        MenuCommand bakeMuttomCommand = new BakeMuttomCommand(barbecuer);
        // 准备服务员
        Waiter waiter = new Waiter();

        //下单
        waiter.setOrder(bakeMuttomCommand);
        waiter.setOrder(bakeChickenWingCommand);
        // 通知执行
        waiter.notifyCook();

    }
}
